﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Data;
using ExamAnalysis.Core;
using ExamAnalysis.Model;
namespace ExamAnalysis.test
{
    public class TestTest
    {
        ExamAnalysisDataContext db = new ExamAnalysisDataContext();
        public void ReadExcelToTableTest()
        {
            FileInfo excelfile = new FileInfo(@"l:\班级信息录入模板.xlsx"); // TODO: 初始化为适当的值
      //      InputUtil.inputStudentFromDataTable(excelfile, 2);
        }
        public void dataTableToSheetTest()
        {
            var list = from s in db.ClassInfo
                       select s;
          DataTable dataTable=DataSetLinqOperators.CopyToDataTable(list);
            FileInfo excelfile = new FileInfo(@"l:\班级信息录入模板.xlsx"); // TODO: 初始化为适当的值
            ExcelUtil.dataTableToSheet("sheet1", dataTable, excelfile);
        }
    }

}